QueryTimeout Event

       

Occurs when the query execution time has exceeded the value set in the QueryTimeout property.

Syntax

Private Sub object.QueryTimeout(Query as rdoQuery, Cancel as Boolean)

The QueryTimeout event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
Query An object expression that evaluates to an rdoQuery object whose query has just completed.
Cancel A Boolean expression indicating if an error occurred while processing the query.

The settings for Cancel are:

Setting Description
True RDO should cancel further query processing.
False RDO should continue processing the query for another query timeout period.

Remarks

Fired when a running query has exceeded the time specified by the QueryTimeout property. This event is fired each time the QueryTimeout time has been reached. This event is fired on both asynchronous and synchronous queries.

The Cancel parameter indicates if RDO should cancel the query or continue processing the query and wait for the number of seconds specified in the QueryTimeout property. The default value of this parameter is True, so if your code not respond to this event, the query is canceled after the QueryTimeout time has been reached. If the value of the parameter is set to False, RDO continues to wait for the query to complete for another QueryTimeout period.

You can use this method to display a message box to the user asking them if they wanted to cancel the query, or continue to wait another N seconds.

The QueryTimeout event fires for all queries execute on this rdoConnection. This includes those queries executed via the OpenResultset or Execute methods, as well as those executed from an associated rdoQuery object. The Query argument is an object reference indicating which query just timed out. Using this argument, you can write a single event handler for all queries on the connection, but still customize the handler for specific queries. When executing queries against the rdoConnection object itself, RDO creates an rdoQuery object internally, and a reference to this internal rdoQuery is passed as the Query argument.